#ifdef _WIN32

#pragma once
#include "canvas.h"
#include "render_control_software_impl_base.h"
#include <windows.h>
#include <gdiplus.h>

namespace krryn{
namespace system_imp{
	class render_control_software_impl_win32 : public krryn::gui::render_control_software_impl_base{
	public:
		virtual void make(const krryn::gui::render_control_software_initializer &a_Initializer);
		virtual void swap_buffers();
		virtual void* handle(){return m_hWnd;}
		virtual void make_current();
		virtual view::canvas *lock();
		virtual void unlock();
	private:
		void destroy_window(const krryn::gui::render_control_software_initializer &a_Initializer);
		HDC	m_hDC;
		HGLRC m_hRC;
		HWND m_hWnd;
		Gdiplus::Graphics *m_Graphics;
		Gdiplus::Bitmap *m_Bitmap;
		Gdiplus::BitmapData m_Data;
		view::canvas *m_Canvas;
	};
}
}

#endif